package com.mashibing.juc.c_002;

/**
 * synchronized锁定当前对象
 * @author: Yuanzt
 * @Date: 2021/3/24
 */
public class T {

    private int count = 10;

    public void m(){
        synchronized (this){
            count--;
            System.out.println(Thread.currentThread().getName()+" count = "+count);
        }
    }
}
